package exe3.carrent;
//轿车
public class LittleCar extends Car{
    private String model;//车辆型号

  public  LittleCar(){}

    public LittleCar(String carNum,String brand,double rent,String model,boolean isLease,int seatNum){
        super(carNum,brand,rent,isLease,model,seatNum);
        this.model=model;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }
    @Override
    public double countRent(int days){
        double price;
        price=getRent()*days;
        if (days>7&&days<30){
            price*=0.9;
        }else  if (days>=30&&days<=150){
            price*=0.8;
        }else if (days>=150){
            price*=0.7;
        }
        return price;
    }

}
